---
slug: "api/workspace-settings"
title: "Workspace Settings"
---

Each workspace has a set of **settings** associated with it. They configure workspace-wide options for all members. This includes metadata and content formatting options, your [Prettier](https://prettier.io/) config, and the configuration of your dashboard views. The API enables you to retrieve and configure these settings.

## Retrieve Workspace Settings

Retrieves workspace settings.

<EndpointCard
  method="GET"
  endpoint="/workspace-settings"
>
  <ResponseExample>
    ```json
    {
      "id": "93b51ca88b6f80085ddb7b4c",
      "prettierConfig": "string",
      "dashboardViews": {
        "table": [
          {
            "id": "string",
            "width": 0
          }
        ]
      },
      "metadata": {
        "canonicalLinkPattern": "string",
        "enabledFields": [
          "slug"
        ]
      },
      "marks": [
        "bold"
      ],
      "blocks": [
        "heading1"
      ],
      "embeds": [
        "codepen"
      ]
    }
    ```
  </ResponseExample>
  
  <RequestExample label="JavaScript">
    ```javascript
    const client = createClient({
      token: "<API_TOKEN>"
    });
    const result = await client.workspaceSettings.get();
    ```
  </RequestExample>
</EndpointCard>

## Update Workspace Settings

Updates workspace settings using the provided data.

<EndpointCard
  method="PUT"
  endpoint="/workspace-settings"
>
  <RequestExample label="JavaScript">
    ```javascript
    const client = createClient({
      token: "<API_TOKEN>",
    });
    const result = await client.workspaceSettings.update({
      // Optional
      prettierConfig: "{}",
      // Optional
      dashboardViews: {
        // Optional
        table: [
          {
            id: "string",
            width: 0,
          },
        ],
      },
      // Optional
      metadata: {
        // Optional
        canonicalLinkPattern: "string",
        // Optional
        enabledFields: ["slug"],
      },
      // Optional
      marks: ["bold"],
      // Optional
      blocks: ["heading1"],
      // Optional
      embeds: ["codepen"],
    });
    ```
  </RequestExample>
</EndpointCard>